home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 19.zip
/
BS1 part 19
/
how to learn assembler.adf
/
CH5
/
5_5Csiren.S
< prev
next >
Wrap
Text File
|
1988-02-25
|
800b
|
50 lines
;** Modulatred Sound generation using Hardware-Register ** (5.5C)
ctlw = $dff096
adcon = $dff09e
c0thi = $dff0a0
c0tlo = c0thi+2
c0tl = c0thi+4
c0per = c0thi+6
c0vol = c0thi+8
;!!! when > 500KB !!!
; org $40000
; load $40000
;!!!!!!!!!!!!!!!!!!!!
run:
move.l #table,c0thi+16 ;Table beginning
move #8,c0tl+16 ;Table length
move #300,c0per+16 ;Sample rate
move #40,c0vol+16 ;Volume
move.l #table2,c0thi
move #8,c0tl
move #60000,c0per
move #20,c0vol
move #$8010,adcon
move #$8203,ctlw
move #-1,d0
loop:
dbra d0,loop
still:
move #$10,adcon
move #3,ctlw
rts
data ; if more than 500K put in chip ram
table:
dc.b -40,-70,-90,-100,-90,-70,-40,0
dc.b 40,70,90,100,90,70,40,0
table2:
dc.w 400,430,470,500,530,500,470,430
end